home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Amiga Amateur Radio User Group / AARUG UK #02 (1990-05)(Amiga Amateur Radio User Group UK)(PD).zip / AARUG UK #02 (1990-05)(Amiga Amateur Radio User Group UK)(PD).adf / EDible.doc < prev    next >
Text File  |  1993-12-02  |  3KB  |  57 lines

  1. Have you ever seen...
  2.                       File contains binary
  3.                       ed failed returncode 20
  4. from a file you KNOW is just text, or somthing you just captured, or
  5. somthing you just downloaded?  Don't you just HATE THAT!  Arrrrggg...
  6.  
  7. How 'bout when you start to use MicroEmacs but the file you're trying to
  8. read has only <CR> and no linefeeds and you get the message that you have
  9. ONE LONG LINE that has been truncated?  How I HATE THAT TOO... Grumph...
  10.  
  11.   Well, I couldn't take it anymore so I wrote this little filter program
  12. that will ignore all those little "gremlin" characters and, if you wish,
  13. limit the line length from 1 to 255 characters!  YEAH... YaHOOY...
  14.   It's nothing fancy, just a fast down-and-dirty filter and here is how you
  15. use it:
  16.   EDible <input file name> <output file name> [max line length]
  17.  
  18. The input file name is the file you want to "clean".  The output file name
  19. is what you want to call the "cleaned" file.  Max line length is optional,
  20. but if you DON'T set it;i.e.,
  21.  
  22. EDible foo.in foo.out
  23.  
  24.  it will DEFAULT to 77 characters per line.
  25.  If you set max line length to 0 then it will not truncate any lines; i.e.,
  26.  
  27. EDible foo.in foo.out 0
  28.  
  29.   If you set max line length to a value greater than 255;i.e.,
  30.  
  31. EDible foo.in foo.out 1000
  32.  
  33.   the maximum length will be 255.  Remember, this is a MAXIMUM line length
  34.   NOT a MINIMUM.  In other words, if  you set max line length to 80;i.e.,
  35.  
  36. EDible foo.in foo.out 80
  37.  
  38.   and EDible reads a line that is 60 characters long, it will NOT change the
  39.   length of that line.  If EDible reads a line that is 84 characters long,
  40.   it will make two lines out of it- the first will be 80 characters and the
  41.   second will be 4 characters long.
  42.  
  43.  
  44. EDible does NOT convert <CR> to <LF>.  ED will do that for you, and if you
  45. are using MicroEMacs then it is easy enough to convert using Search and
  46. Replace.  Besides, maybe you don't want them changed, right?
  47.  
  48. Hint for ED users:  if the file had both <LF> and <CR> then everything will
  49. be double spaced lines.  Use *rp(d;n);t  to clear that problem.  Oh, be SURE
  50. the cursor is on a blank line before you start that command!
  51.  
  52. ***************************************************************************
  53. This program was written by J. Christopher Redden   GEnie address J.REDDEN
  54. 248 Southwest Pkwy. #1012  Lewisville, Tx. 75067   (214) 221-1619 and is
  55. released to public domain as long as this ReadMe file goes along with it.
  56. ***************************************************************************
  57.